home *** CD-ROM | disk | FTP | other *** search
/ Take-Home Tutor en Espanol / TakeHomeTutor.iso / pc / En espanol / Take-Home Tutor 3 / flipcard_u3e3.swf / scripts / DefineButton2_157 / BUTTONCONDACTION on(release).as
Encoding:
Text File  |  2003-10-29  |  1.6 KB  |  44 lines

  1. on(release){
  2.    if(activeMCList.length > 1)
  3.    {
  4.       stopAllSounds();
  5.       if(_root.direction eq "backward")
  6.       {
  7.          _root.activeMC = _root.activeMCList.shift();
  8.          _root.activeMClist.push(_root.activeMC);
  9.          _root.activeMC = _root.activeMCList.shift();
  10.          _root.activeMClist.push(_root.activeMC);
  11.       }
  12.       else if(_root.direction eq "forward")
  13.       {
  14.          _root.activeMC = _root.activeMCList.shift();
  15.          _root.activeMClist.push(_root.activeMC);
  16.       }
  17.       tellTarget("_root.dynamicbuttonMc")
  18.       {
  19.          setProperty("frontAudioInstance", _visible, false);
  20.          setProperty("backAudioInstance", _visible, false);
  21.          setProperty("frontImageHolderInstance", _visible, false);
  22.          setProperty("backImageHolderInstance", _visible, false);
  23.          var question = _root.frontArray[_root.activeMC];
  24.          var answer = _root.backArray[_root.activeMC];
  25.          var frontAudio = _root.frontAudioArray[_root.activeMC];
  26.          var backAudio = _root.backAudioArray[_root.activeMC];
  27.          var frontImage = _root.frontImageArray[_root.activeMC];
  28.          var backImage = _root.backImageArray[_root.activeMC];
  29.          setProperty("_root.flipcursor1", _visible, false);
  30.          gotoAndPlay(1);
  31.       }
  32.       if(passiveMC < _root.activeTotal)
  33.       {
  34.          passiveMC += 1;
  35.       }
  36.       else if(passiveMC = _root.activeTotal)
  37.       {
  38.          passiveMC = 1;
  39.       }
  40.       cardlisting = "Tarjeta: <font color =\"#6868CE\">" + _root.passiveMC + "</font>" + " de " + "<font color =\"#6868CE\">" + _root.activeTotal + "</font>";
  41.    }
  42.    _root.direction = "forward";
  43. }
  44.